package cn.e3.potral.controller;

import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.e3.content.service.ContentService;
import cn.e3.jedis.JedisClient;
import cn.e3.pojo.TbContent;
import cn.e3.utils.JsonUtils;

@Controller
public class ContentController {
	@Value("${Lunbotu_cid}")
	private Long cid;
	
	@Autowired
	private ContentService contentService;
	@RequestMapping("/index")
	public String getContentByCid(Model model){
		
		
		List<TbContent> list = contentService.getContentByCid(cid);
		model.addAttribute("ad1List", list);
		
		
		return "index";
	}
}
